package com.ruoyi.project.platform.service;

import java.util.List;

import com.ruoyi.project.platform.agent.basic.AccountDto;
import com.ruoyi.project.platform.agent.basic.TriggerDto;
import com.ruoyi.project.platform.agent.constant.Platform;
import com.ruoyi.project.platform.domain.RRobotRunning;
import com.ruoyi.project.platform.dto.RunningContainerDto;
import com.ruoyi.project.platform.dto.UserRunningDto;

/**
 * 机器人实例Service接口
 *
 * @author ruoyi
 * @date 2020-07-29
 */

public interface IRRobotRunningService {
    /**
     * 查询机器人实例
     *
     * @param runningId 机器人实例ID
     * @return 机器人实例
     */
    public RRobotRunning selectRRobotRunningById(Long runningId);

    /**
     * 查询机器人实例列表
     *
     * @param rRobotRunning 机器人实例
     * @return 机器人实例集合
     */
    public List<RRobotRunning> selectRRobotRunningList(RRobotRunning rRobotRunning);

    /**
     * 新增机器人实例
     *
     * @param rRobotRunning 机器人实例
     * @return 结果
     */
    public int insertRRobotRunning(RRobotRunning rRobotRunning);

    /**
     * 修改机器人实例
     *
     * @param rRobotRunning 机器人实例
     * @return 结果
     */
    public int updateRRobotRunning(RRobotRunning rRobotRunning);

    /**
     * 批量删除机器人实例
     *
     * @param runningIds 需要删除的机器人实例ID
     * @return 结果
     */
    public int deleteRRobotRunningByIds(Long[] runningIds);

    /**
     * 删除机器人实例信息
     *
     * @param runningId 机器人实例ID
     * @return 结果
     */
    public int deleteRRobotRunningById(Long runningId);

    public UserRunningDto.UserResource resourcesByUserId(Long userId);

    public Object create(Long endpointId, Long robotId);

    public Object stop(Long runningId);

    public Object start(Long runningId);

    public Object remove(Long runningId);

    public Object restart(Long runningId);

    public Object pause(Long runningId);

    public Object reverse(Long runningId);

    public List<UserRunningDto.ExchangeDto> exchanges(String containerId);

    public List<UserRunningDto.MappingDto> mappings(String containerId);

    public Object inspect(Long runningId);

    void syncStates();

    public Object updateVersion(Long runningId);

    public Object verify(RunningContainerDto.VerifyBase verify);

    public Object getCurrentBalance(String runningId, Platform platform);

    Object getAccountReport(String runningId, Platform platform);

    Object getAvgDealPrice(String runningId, Platform platform, Long start);

    Object analyseDepths(String runningId, Platform platform);

    Object getTicker(String runningId, Platform platform);

    Object queryFlyOrders(String runningId, Platform platform, Integer type);

    Object getDealedOrder(String runningId, Platform platform, Integer type, Long start, Long end, Long size, Long page);

    Object placeOrder(String runningId, AccountDto.FixedAction action);

    Object cancelOrder(String runningId, String orderId, Platform platform, Integer type);

    Object caclasSafeStop(String runningId, Platform platform, Integer delay);

    Object configAction(String runningId, AccountDto.Action action);

    List<RRobotRunning> getRuningByIds(Long[] runningIds);

    Object usdtCurrent(String runningId, Platform platform, Long start);

    Object createTrigger(String runningId, TriggerDto.TriggerBase trigger);

    Object listTrigger(String runningId);

    Object closeTrigger(String runningId, Long id);

    Object activeTrigger(String runningId, Long id);

    Object freshTrigger(String runningId, Long id);

    Object deleteTrigger(String runningId, Long id);

    Object closeAll(String runningId);

    Object freshAll(String runningId);

    Object activeAll(String runningId);

}
